package org.neuedu.ssmp.crm.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import org.apache.ibatis.annotations.Select;
import org.neuedu.ssmp.crm.entity.Fw;

import java.util.List;

public interface FwMapper extends BaseMapper<Fw> {
    @Select("select MID(create_time,1,4) createTime from serve_list group by MID(create_time,1,4)")
    List<Fw> sum();
    @Select("select a.name,count(a.name) sun from serve a join serve_list b on a.id=b.service_id where MID(create_time,1,4)=#{createTime} group by a.name,MID(create_time,1,4)")
    List<Fw> fw(Fw createTime);
    @Select("select a.name,count(b.user_id) sun from serve a left join serve_list b on a.id=b.service_id group by a.name")
    List<Fw> fwa();
}
